Command descriptions for sequential-access devices LOCATE command READ BLOCK LIMITS command
SCSI-2

10.2.4 READ command (sequential access)

The READ command (see table 178) requests that the target transfer one or more block(s) of data to the initiator beginning with the next block on the logical unit.

Table 178 - READ command

===============================================================================
|  Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    |
|Byte |        |        |        |        |        |        |        |        |
|=============================================================================|
| 0   |                           Operation code (08h)                        |
|-----------------------------------------------------------------------------|
| 1   |   Logical unit number     |        Reserved         |  SILI  | Fixed  |
|-----------------------------------------------------------------------------|
| 2   | (MSB)                                                                 |
|---------                                                                 ---|
| 3   |                           Transfer length                             |
|---------                                                                 ---|
| 4   |                                                                 (LSB) |
|-----------------------------------------------------------------------------|
| 5   |                           Control                                     |
===============================================================================
The fixed bit specifies whether fixed-length or variable-length blocks are to be transferred. Refer to the READ BLOCK LIMITS command (see 10.2.5) for additional information about fixed and variable block mode.

If the fixed bit is one, the transfer length specifies the number of fixed-length blocks to be transferred, using the current block length reported in the mode parameters block descriptor (see 8.3.3). If the fixed bit is zero, a variable-length block is requested with the transfer length specifying the maximum number of bytes allocated for the returned data.

A successful READ command with a fixed bit of one shall transfer the requested transfer length times the current block length in bytes to the initiator. A successful READ command with a fixed bit of zero shall transfer the requested transfer length in bytes to the initiator. Upon completion, the logical position shall be after the last block transferred (end-of-partition side).

If the suppress incorrect length indicator (SILI) bit is one and the fixed bit is zero, the target shall:

  1. report CHECK CONDITION status for an incorrect length condition only if the overlength condition exists (see 10.4) and the block length field in the mode parameter block descriptor is nonzero (see 8.3.3).
  2. not report CHECK CONDITION status if the only error is the underlength condition (see 10.4), or if the only error is the overlength condition and the block length field of the mode parameters block descriptor is zero. ( Since the residue information normally provided in the information field of the sense data may not be available when the SILI bit is set, other methods for determining the actual block length should be used (e.g. including length information in the data block). )

If the SILI bit is one and the fixed bit is one, the target shall terminate the command with CHECK CONDITION status and the sense key shall be set to ILLEGAL REQUEST with an additional sense code of INVALID FIELD IN CDB.

If the SILI bit is zero and an incorrect length block is read, CHECK CONDITION status shall be returned and the ILI and valid bits shall be set to one in the sense data. Upon termination, the logical position shall be after the incorrect length block (end-of-partition side). If the fixed bit is one, the information field shall be set to the requested transfer length minus the actual number of blocks read (not including the incorrect length block). If the fixed bit is zero, the information field shall be set to the requested transfer length minus the actual block length. Targets that do not support negative values shall set the information field to zero if the overlength condition exists (see 10.4).

( In the above case with the fixed bit of one, only the position of the incorrect-length logical block can be determined from the sense data. The actual length of the incorrect block is not reported. Other means may be used to determine its actual length (e.g. read it again with the fixed bit set to zero). )

A transfer length of zero indicates that no data shall be transferred. This condition shall not be considered an error and the logical position shall not be changed.

If the logical unit encounters a filemark during a READ command, CHECK CONDITION status shall be returned and the filemark and valid bits shall be set to one in the sense data. The sense key shall be set to NO SENSE or RECOVERED ERROR, as appropriate. Upon termination, the logical position shall be after the filemark (end-of-partition side). If the fixed bit is one, the information field shall be set to the requested transfer length minus the actual number of blocks read (not including the filemark). If the fixed bit is zero, the information field shall be set to the requested transfer length.

If the logical unit encounters a setmark during a READ command and the RSmk bit is set to one in the device configuration page (see 10.3.3.1), CHECK CONDITION status shall be returned and the filemark and valid bits shall be set to one in the sense data. The sense key shall be set to NO SENSE or RECOVERED ERROR, as appropriate, and the additional sense code shall be set to SETMARK DETECTED. Upon termination, the logical position shall be after the setmark (end-of-partition side). If the fixed bit is one, the information field shall be set to the requested transfer length minus the actual number of blocks read (not including the setmark). If the fixed bit is zero, the information field shall be set to the requested transfer length. The target shall not return CHECK CONDITION when a setmark is encountered if the RSmk bit is set to zero or if this option is not supported.

If the logical unit encounters early-warning during a READ command and the REW bit is set to one in the device configuration page (see 10.3.3.1), CHECK CONDITION status shall be returned upon completion of the current block. The sense key shall be set to NO SENSE or RECOVERED ERROR, as appropriate. The EOM and valid bits shall be set to one in the sense data. Upon termination, the logical position shall be after the last block transferred (end-of-partition side). If the fixed bit is one, the information field shall be set to the requested transfer length minus the actual number of blocks read. If the fixed bit is zero, the information field shall be set to the requested transfer length minus the actual block length. The target shall not return CHECK CONDITION status when early- warning is encountered if the REW bit is zero or if the REW option is not supported.

( A REW bit of one is not recommended for most system applications since read data may be present after early-warning. )

If the logical unit encounters end-of-data during a READ command, CHECK CONDITION status shall be returned, the sense key shall be set to BLANK CHECK, and the valid bit shall be set to one in the sense data. If end- of-data is encountered at or after early-warning, the EOM bit shall also be set to one. Upon termination, the logical position shall be after the last recorded logical block (end-of-partition side). If the fixed bit is one, the information field shall be set to the requested transfer length minus the actual number of blocks read. If the fixed bit is zero, the information field shall be set to the requested transfer length.

If the logical unit encounters end-of-partition during a READ command, CHECK CONDITION status shall be returned, the sense key shall be set to MEDIUM ERROR, and the EOM and valid bits shall be set to one in the sense data. The medium position following this condition is not defined. If the fixed bit is one, the information field shall be set to the requested transfer length minus the actual number of blocks read. If the fixed bit is zero, the information field shall be set to the requested transfer length.